package 练习程序;

public class 验证连续数立方之和 {
    public static void main(String[] args) {

        int i, j;
        j = 6;
        int sum = 0;
        for (i = 3; i <= 5; i++) {
            int a = i * i * i;
            sum += a;


        }
        System.out.println(sum);
        System.out.println((j * j * j));
        if (sum == (j * j * j)) {
            System.out.println("等式成立");
        } else {
            System.out.println("等式不成立");
        }


    }
}
